﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admincp/MasterPageEmpty.master"
    AutoEventWireup="true" CodeFile="tktlkscl.aspx.cs" Inherits="admincp_tktlkscl" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Src="wucSideBar.ascx" TagName="wucSideBar" TagPrefix="uc1" %>
<%@ Register Src="wucNavTop.ascx" TagName="wucNavTop" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="Server">
    <script type="text/javascript">
    // <![CDATA[
        function AddSelectedItems() {
            MoveSelectedItems(lstLopHocChonThongKe, lstLopHocKhongChonThongKe);
            UpdateButtonState();
        }
        function AddAllItems() {
            MoveAllItems(lstLopHocChonThongKe, lstLopHocKhongChonThongKe);
            UpdateButtonState();
        }
        function RemoveSelectedItems() {
            MoveSelectedItems(lstLopHocKhongChonThongKe, lstLopHocChonThongKe);
            UpdateButtonState();
        }
        function RemoveAllItems() {
            MoveAllItems(lstLopHocKhongChonThongKe, lstLopHocChonThongKe);
            UpdateButtonState();
        }
        function MoveSelectedItems(srcListBox, dstListBox) {
            srcListBox.BeginUpdate();
            dstListBox.BeginUpdate();
            var items = srcListBox.GetSelectedItems();
            for (var i = items.length - 1; i >= 0; i = i - 1) {
                dstListBox.AddItem(items[i].text, items[i].value);
                srcListBox.RemoveItem(items[i].index);
            }
            srcListBox.EndUpdate();
            dstListBox.EndUpdate();
        }
        function MoveAllItems(srcListBox, dstListBox) {
            srcListBox.BeginUpdate();
            var count = srcListBox.GetItemCount();
            for (var i = 0; i < count; i++) {
                var item = srcListBox.GetItem(i);
                dstListBox.AddItem(item.text, item.value);
            }
            srcListBox.EndUpdate();
            srcListBox.ClearItems();
        }
        function UpdateButtonState() {
            btnMoveAllItemsToRight.SetEnabled(lstLopHocChonThongKe.GetItemCount() > 0);
            btnMoveAllItemsToLeft.SetEnabled(lstLopHocKhongChonThongKe.GetItemCount() > 0);
            btnMoveSelectedItemsToRight.SetEnabled(lstLopHocChonThongKe.GetSelectedItems().length > 0);
            btnMoveSelectedItemsToLeft.SetEnabled(lstLopHocKhongChonThongKe.GetSelectedItems().length > 0);
        }
    // ]]>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTopBar" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphSideBar" runat="Server">
    <uc1:wucSideBar ID="wucSideBar1" runat="server" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphNavTop" runat="Server">
    <uc2:wucNavTop ID="wucNavTop1" runat="server" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphContent" runat="Server">
    <div class="flat_area grid_4">
        <h2>
            Chọn năm học:</h2>
        <asp:DropDownList ID="ddlNamHoc" title="Chọn năm học" runat="server">
        </asp:DropDownList>
        <br />
        <br />
    </div>
    <div class="flat_area grid_4">
        <h2>
            Chọn học kỳ:</h2>
        <asp:DropDownList ID="ddlHocKy" title="Chọn năm học" runat="server">
        </asp:DropDownList>
        <br />
        <br />
    </div>
    <div class="flat_area grid_4">
        <h2>
            Chọn khối:</h2>
        <asp:DropDownList ID="ddlKhoi" title="Chọn khối" runat="server" 
            AutoPostBack="True" onselectedindexchanged="ddlKhoi_SelectedIndexChanged">
        </asp:DropDownList>
        <br />
        <br />
    </div>
    <div class="flat_area grid_4">
        <h2>
            Chọn môn học:</h2>
        <asp:DropDownList ID="ddlMonHoc" title="Chọn môn học" runat="server">
        </asp:DropDownList>
        <br />
        <br />
    </div>
    <div class="flat_area grid_4">
        <h2>
            Các lớp chọn thống kê &darr;:</h2>
        <dx:ASPxListBox ID="lstLopHocChonThongKe" runat="server"
            Height="150px" Width="100%" ClientInstanceName="lstLopHocChonThongKe" 
            SelectionMode="CheckColumn">
            <ClientSideEvents SelectedIndexChanged="function(s, e) {
	UpdateButtonState();
}" />
        </dx:ASPxListBox>
        <br />
        <br />
    </div>
    <div class="flat_area grid_4">
        <h2>
            Trừ lớp &darr;:</h2>
        <dx:ASPxButton ID="btnMoveSelectedItemsToRight" runat="server" 
            Text="Trừ &gt;" AutoPostBack="False"
            Width="100%" ClientInstanceName="btnMoveSelectedItemsToRight">
            <ClientSideEvents Click="function(s, e) {
	AddSelectedItems();
}" />
        </dx:ASPxButton>
        <dx:ASPxButton ID="btnMoveAllItemsToRight" runat="server" 
            Text="Trừ tất cả &gt;&gt;" AutoPostBack="False"
            Width="100%" ClientInstanceName="btnMoveAllItemsToRight">
            <ClientSideEvents Click="function(s, e) {
	AddAllItems();
}" />
        </dx:ASPxButton>
        <dx:ASPxButton ID="btnMoveSelectedItemsToLeft" runat="server" 
            Text="&lt; Bỏ trừ" AutoPostBack="False"
            Width="100%" ClientInstanceName="btnMoveSelectedItemsToLeft">
            <ClientSideEvents Click="function(s, e) {
	RemoveSelectedItems();
}" />
        </dx:ASPxButton>
        <dx:ASPxButton ID="btnMoveAllItemsToLeft" runat="server" 
            Text="&lt;&lt; Bỏ trừ tất cả" AutoPostBack="False"
            Width="100%" ClientInstanceName="btnMoveAllItemsToLeft">
            <ClientSideEvents Click="function(s, e) {
	RemoveAllItems();
}" />
        </dx:ASPxButton>
    </div>
    <div class="flat_area grid_4">
        <h2>
            Các lớp không chọn thống kê &darr;:</h2>
        <dx:ASPxListBox ID="lstLopHocKhongChonThongKe" runat="server"
            Height="150px" Width="100%" ClientInstanceName="lstLopHocKhongChonThongKe" 
            SelectionMode="CheckColumn">
            <ClientSideEvents SelectedIndexChanged="function(s, e) {
	UpdateButtonState();
}" />
        </dx:ASPxListBox>
    </div>
    <div class="flat_area grid_4">
        <h2>
            Kỳ khảo sát chất lượng</h2>
        <asp:DropDownList ID="ddlKyKhaoSat" title="Chọn năm học" runat="server">
        </asp:DropDownList>
        <br />
        <br />
        <br />
        <br />
        <br />
    </div>
    <div class="flat_area grid_4">
        <%--<h2>
            Tổng hợp dữ liệu</h2>--%>
        <button id="btnLuu2" runat="server" onserverclick="TongHopDuLieu" class="button_colour round_all">
                <img height="24" width="24" alt="Lưu lại" src="images/icon_excel.png"><span>Tổng hợp và xuất ra Excel</span></button>
        <br />
        <br />
    </div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="cphTemplateOption" runat="Server">
</asp:Content>
